<?=view("home.header")?>
<?=view("home.nav")?>
<div class="content-wrapper">
    <div class="container">
        <div class="row pad-botm">
            <div class="col-md-12">
                <h4 class="header-line">发布留言</h4>
            </div>
        </div>
        <div class="row">
            <div class="col-md-12">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        给公司留言
                    </div>
                    <div class="panel-body">
                        <form role="form" method="post">
                            {{csrf_field()}}
                            <div class="form-group">
                                <label>留言标题</label>
                                <input class="form-control" type="text" name="Mn_Title" required="required" maxlength="50" />
                            </div>
                            <div class="form-group">
                                <label>留言内容</label>
                                <textarea class="form-control" name="Mn_SendContent" maxlength="200" style="min-height: 150px; resize: none;" width="100%" required="required"></textarea>
                            </div>  
                            <button type="submit" class="btn btn-success">提 交 </button>
                            <button type="reset" class="btn btn-primary">取 消</button>
                        </form>
                    </div>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-md-12">
                <table class="table table-striped table-bordered table-hover dataTable no-footer" id="dataTables-example" aria-describedby="dataTables-example_info">
                    <thead>
                        <tr role="row">
                            <th class="sorting_asc" tabindex="0" aria-controls="dataTables-example" rowspan="1" colspan="1" aria-sort="ascending" aria-label="Rendering engine: activate to sort column ascending" style="width: 189px;">留言日期</th>
                            <th class="sorting" tabindex="0" aria-controls="dataTables-example" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending" style="width: 150px;">留言状态</th>
                            <th class="sorting" tabindex="0" aria-controls="dataTables-example" rowspan="1" colspan="1" aria-label="Platform(s): activate to sort column ascending" style="width: 264px;">标题</th>
                            <th class="sorting" tabindex="0" aria-controls="dataTables-example" rowspan="1" colspan="1" aria-label="Platform(s): activate to sort column ascending" style="width: 264px;">留言内容</th>
                            <th class="sorting" tabindex="0" aria-controls="dataTables-example" rowspan="1" colspan="1" aria-label="Platform(s): activate to sort column ascending" style="width: 264px;">回复内容</th>
                            <th class="sorting" tabindex="0" aria-controls="dataTables-example" rowspan="1" colspan="1" aria-label="Platform(s): activate to sort column ascending" style="width: 264px;">回复日期</th>
                        </tr>
                    <tbody>
                        <?php 
                            if ($messages && count($messages) > 0):
                                foreach ($messages as $message):
                        ?>
                        <tr class="gradeA odd">
                            <td class="sorting_1"><?=$message->SendDate?></td>
                            <td class=" "><?=$message->MessageStatus?></td>
                            <td class=" "><?=$message->SendTitle?></td>
                            <td class=" "><?=$message->SendContent?></td>
                            <td class=" "><?=$message->AcceptContent?></td>
                            <td class=" "><?=$message->AcceptDate?></td>
                        </tr>
                        <?php
                                endforeach;
                            endif;
                        ?>
                    </tbody>
                </table>
                <?=$messages->render()?>
            </div>
        </div>
    </div>
</div>
<?=view("home.footer")?>
